package com.qingyun.form.internal.adapter

import android.view.View
import android.widget.TextView
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import com.qingyun.form.R

class FormSelectViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
    private val textView = itemView.findViewById<TextView>(R.id.tvLabel)
    private val nextArrowView: View = itemView.findViewById(R.id.imgNextArrow)
    private val backArrowView: View = itemView.findViewById(R.id.imgBackArrow)
    internal val checkView: View = itemView.findViewById(R.id.tvCheck)

    fun setLabel(text: String) {
        textView.text = text
    }

    fun showArrow(show: Boolean) {
        nextArrowView.isVisible = show
    }

    fun showBackArrow(show: Boolean) {
        backArrowView.isVisible = show
    }

    fun showCheckView(show: Boolean) {
        checkView.isVisible = show
    }
}